<template>
	<view class="p10" style="">
		<view class="flex1 newDetail_head">
			<view class="">
				<image class="ml-30" src='../../static/chip/back.png' mode="widthFix" style="width: 30rpx;" @click="backmarket()"></image>
			</view>
			<view class="fw size-22 newDetail">
				{{title}}
			</view>
		</view>
		<view class="" style="height: 40px;">
			
		</view>
		<view class="center fw">
			{{title}}
		</view>
		<view class="flex1 mt-20">
			<view class="">
				<image :src="image" mode="widthFix" style="width: 60px;"></image>
			</view>
			<view class="mt-30 size-22 ml-20 " style="border-bottom: 1px solid #E5E5E5;height: 70rpx;">
				{{create_time}}
			</view>
		</view>
		<view class="center size-28 fw mt-20">
			{{desc}}
		</view>
		<view class="size-22 mt-20" >
			<u-parse :content="content" @preview="preview" @navigate="navigate" ></u-parse>
		</view>
	</view>

	</view>
</template>
<script>
	import uParse from '@/components/u-parse/u-parse.vue'
	export default {
		components: {
			uParse
		},
		data() {
			return {
				image: '',
				content: '',
				title: '',
				create_time: '',
				desc: "",
				content: '',
			}
		},
		onLoad(id) {
			console.log(id.id);
			this.id = id.id
			this.$http('api/index/newsDetail', {
				id: this.id
			}).then(res => {
				console.log(res);
				this.title = res.title
				this.create_time = res.create_time
				this.desc = res.desc
				this.content = res.content
				this.image = res.image
			});
		},
		onShow() {
			this.inye()

		},
		methods: {
			inye() {

			},
			backmarket(){
				uni.navigateBack({
					url:'/pages/market/index'
				})
			}
		}
	}
</script>
<style lang="less" scoped>
	.newDetail_head{
		    height: 80rpx;
		    position: fixed;
		    z-index: 1;
		    background-color: #FFFF;
		    width: 100%;
		    top: 0;
		    left: 0;
		    line-height: 80rpx;
	}
	.newDetail {
		width: 220rpx;
		overflow: hidden;
		white-space: nowrap;
		text-overflow: ellipsis;
		-o-text-overflow: ellipsis;
		margin: 0 auto;
	}
</style>
